<script lang="ts">
// #ifdef H5
import { useUserStore } from '@/stores/user';
import { setToken } from '@/stores/token';
import { toConfig } from '@/utils/wechat.jssdk';
// #endif
export default {
  onLaunch: function() {
    console.log('App Launch');
  
  },
  onShow: function() {
    // console.log('App Show');
  },
  onHide: function() {
    console.log('App Hide');
	// uni.clearStorageSync();
  },
  setup() {
    console.log('App setup');
    const search = location.search;
    if (search === '') {
      toConfig();
    }
    const token = sessionStorage.getItem('token');
    if (token !== null) {
      setToken(token);
      useUserStore().getUserInfo();
    }
  },
};
</script>

<style>
/*每个页面公共css */
@import url('./styles/main.css');
@import url('./styles/animation.css');
@import url('./styles/lib.css');
@import url('./styles/public.css');
page {
  background-color: #edf2f6;
}
body {
  background-color: #edf2f6;
  height: 100vh;
  overflow: auto;
  font-family: 'PingFangSC-Regular', 'PingFang SC';
}

/* #ifdef MP-WEIXIN */
/* 提高 v-show 编译生成 hidden 样式的权重 */
view[hidden],
text[hidden] {
  display: none !important;
}
/* #endif */

.uni-nav-bar-text {
  font-size: 30rpx !important;
}

.amap-logo {
  display: none !important;
}
.amap-copyright {
  opacity: 0;
}

/* 
uni toast z-index 999
uni-popup default z-index 99
uni-tabbar default z-index 998
uni-tabbar-bottom default z-index 998
*/

.uni-tabbar-bottom {
  z-index: 900 !important;
}
.uni-tabbar {
  z-index: 900 !important;
}
</style>
